package com.sxt.springboot.config;

import org.springframework.boot.web.servlet.ServletListenerRegistrationBean;
import org.springframework.context.annotation.Configuration;

import com.sxt.sys.listener.ApplicationListener;

@Configuration
public class WebConfig {
/**
 * 注册监听器
 */
	public ServletListenerRegistrationBean<ApplicationListener> getApplicationListener(){
		ApplicationListener applicationListener=new ApplicationListener();
		ServletListenerRegistrationBean<ApplicationListener> listenerRegistrationBean=new ServletListenerRegistrationBean<ApplicationListener>(); 
		listenerRegistrationBean.setListener(applicationListener);
		
		return listenerRegistrationBean;
		
	}
}
